<%@ page import="java.util.Arrays" %><%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/11/12
  Time: 21:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>test</h1>
<%--<%--%>
<%--    String idstr = request.getParameter("id");--%>
<%--    Integer id = Integer.parseInt(idstr);--%>
<%--    id++;--%>
<%--将数据存入到request中--%>
<%--    request.setAttribute("number",id);--%>
<%--将请求转发给test2.jsp--%>
<%--    request.getRequestDispatcher("test2.jsp").forward(request,response);--%>
<%--%>--%>
<%--<%=id%>--%>

<%
    request.setCharacterEncoding("UFT-8");
    // 获取客户端传来的多个同名参数
    String[] names = request.getParameterValues("name");
%>
<%=Arrays.toString(names)%>
</body>
</html>